<{extend name="base" /}>
<{block name="body"}>
<div class="layui-body">
    <!--tab标签-->
    <div class="layui-tab layui-tab-brief">
        <ul class="layui-tab-title">
            <li class=""><a href="<{:url('admin/admin_user/index')}>">管理员</a></li>
            <li class=""><a href="<{:url('admin/admin_user/add')}>">添加管理员</a></li>
            <li class="layui-this">编辑管理员</li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                <form class="layui-form form-container" action="<{:url('admin/admin_user/update')}>" method="post">
                    <div class="layui-form-item">
                        <label class="layui-form-label">用户名</label>
                        <div class="layui-input-block">
                            <input type="text" name="username" value="<{$admin_user.username}>" required  lay-verify="required" placeholder="请输入用户名" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">密码</label>
                        <div class="layui-input-block">
                            <input type="password" name="password" value="" placeholder="（选填）如不修改则留空" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">重复密码</label>
                        <div class="layui-input-block">
                            <input type="password" name="confirm_password" value="" placeholder="（选填）如不修改则留空" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                       <label class="layui-form-label">到期时间</label>
                        <div class="layui-input-block">
                            <input type="date" name="endtime" value="<{:date('Y-m-d',$admin_user.endtime)}>" lay-verify="required" class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">状态</label>
                        <div class="layui-input-block">
                            <input type="radio" name="status" value="1" title="启用" <{if condition="$admin_user.status==1"}> checked="checked"<{/if}>>
                            <input type="radio" name="status" value="0" title="禁用" <{if condition="$admin_user.status==0"}> checked="checked"<{/if}>>
                        </div>
                    </div>       
                    <div class="layui-form-item">
                        <label class="layui-form-label">所属权限组</label>
                        <div class="layui-input-block">
                            <select name="group_id" lay-verify="required">
                                <{foreach name="auth_group_list" item="vo"}>
                                <option value="<{$vo.id}>" <{if condition="$admin_user.group_id==$vo.id"}> selected="selected"<{/if}>><{$vo.title}></option>
                                <{/foreach}>
                            </select>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <input type="hidden" name="id" value="<{$admin_user.id}>">
                            <button class="layui-btn" lay-submit lay-filter="*">更新</button>
                            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<{/block}>